/*
* PROJECT: Happy New Year
* VERSION: 1.0
* AUTHOR: Mattias Thell
* URL: http://www.mattiasthell.com
*
* */

#pragma once

#include <map>
#include <string>

#include <fmod.hpp>

#include "Audio.hpp"

namespace hny {

	typedef std::map<std::string, Audio*> AudioMap;

	class AudioManager
	{
	public:
		~AudioManager();
		void Destroy();

		static AudioManager* GetInstance();

		bool Initialize();

		void Update();

		bool AddAudio(const std::string& file, const std::string& name, bool stream = false);
		Audio* AudioManager::GetSound(const std::string& name);



	private:
		AudioManager();
		AudioManager(const AudioManager&);
		AudioManager& operator= (const AudioManager&);
		static AudioManager* mInstance;

		FMOD::System* mFmSystem;

		AudioMap mAudio;
	};
}